﻿@model ArticleListVM
@{

    PageMeta pm = (PageMeta)ViewBag.PageMeta;
    ViewBag.Title = pm != null ? pm.Title : "新闻资讯";
}

@section header{
    @if (pm != null)
    {
        <meta name="description" content="@pm.Description" />
        <meta name="keywords" content="@pm.Keyword" />
    }
}


<div class="container sitepath">
    <ol class="breadcrumb">
        <li><a href="/">首页</a></li>
        <li class="active">新闻资讯</li>
    </ol>
</div>


<!-- BLOG ================================================== -->
<section class="container page-news">
    <div class="row">
        <div class="col-md-10 col-md-offset-1 animated fadeInLeft">

            @foreach (var post in Model.Articles)
            {

                <a class="item" href="@Url.Action("detail",new { id = post.Id})">
                    <div class="thumbnail">
                        <img src="@post.Thumbnail" alt="@post.Title">
                    </div>
                    <div class="des">
                        <h3>@post.Title</h3>

                        <div class="note">
                            <ul>
                                <li>
                                    By @post.Source
                                </li>
                                <li>
                                    @string.Format("{0:D}", post.Pubdate)
                                </li>
                            </ul>
                        </div>

                        <p>@post.Summary</p>

                    </div>
                </a>

            }
            @if (Model.Articles.Any())
            {
                <div class="text-center">
                    @Html.PagedListPager((IPagedList)Model.Articles, page => Url.Action("Index", new { page }))
                </div>
            }
            else
            {
                <div class="alert alert-info">
                    <i class="iconfont icon-info"></i>  未找到任何项。
                </div>
            }

        </div>



    </div>





</section>


